package com.xinqi.modules.homework.homework.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.homework.homework.domain.CourseHomeworkEntity;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkCreateDTO;
import com.xinqi.modules.homework.homework.dto.req.CourseHomeworkUpdateDTO;
import com.xinqi.modules.homework.homework.dto.rsp.CourseHomeworkResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 课程作业配置表转换
 *
 * @author: system
 * @date: 2023/03/08
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseHomeworkConvert {

    public abstract CourseHomeworkEntity create(CourseHomeworkCreateDTO s);

    public abstract CourseHomeworkEntity newEntity(CourseHomeworkEntity s);

    public abstract CourseHomeworkEntity update(CourseHomeworkUpdateDTO s, @MappingTarget CourseHomeworkEntity t);

    public abstract CourseHomeworkEntity update(CourseHomeworkUpdateDTO s);

    public abstract CourseHomeworkResultDTO convert(CourseHomeworkEntity s);

    public abstract CourseHomeworkResultDTO convert(CourseHomeworkResultDTO s);

    public abstract CourseHomeworkCreateDTO create(CourseHomeworkUpdateDTO s);

    public abstract CourseHomeworkCreateDTO create(CourseHomeworkEntity s);
}
